home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / Hack / MISC / SNIFFER.ZIP / SNIFFER.FAQ
Encoding:
Text File  |  1996-05-24  |  20.0 KB  |  549 lines

  1.  
  2.                                   SNIFFER FAQ
  3.                                        
  4.    Version: 1.7
  5.      _________________________________________________________________
  6.    
  7.    This Security FAQ is a resource provided by:
  8.  
  9. Internet Security Systems, Inc.
  10. 5871 Glenridge Drive, Suite 115   Tel: (404) 252-7270
  11. Atlanta, Georgia  30328           Fax: (404) 252-2427
  12.  
  13.      - Internet Scanner ... the most comprehensive "attack simulator"
  14.      available. -
  15.      
  16.    
  17.      _________________________________________________________________
  18.    
  19.    To get the newest updates of Security files check the following
  20.    services:
  21.    
  22.      http://www.iss.net/
  23.      ftp ftp.iss.net /pub/ 
  24.      
  25.    To subscibe to the update mailing list, Alert, send an e-mail to
  26.    request-alert@iss.net and, in the te xt of your message (not the
  27.    subject line), write:
  28.    
  29.      subscribe alert
  30.      
  31.    
  32.      _________________________________________________________________
  33.    
  34.    This Sniffer FAQ will hopefully give administrators a clear
  35.    understanding of sniffing problems and hopefully possible solutions to
  36.    follow up with. Sniffers is one of the main causes of mass break-ins
  37.    on the Internet today.
  38.    
  39.    This FAQ will be broken down into:
  40.      * What a sniffer is and how it works 
  41.      * Where are sniffers available 
  42.      * How to detect if a machine is being sniffed 
  43.      * Stopping sniffing attacks: 
  44.           + Active hubs 
  45.           + Encryption 
  46.           + Kerberos 
  47.           + One-time password technology 
  48.           + Non-promiscuous interfaces 
  49.             
  50.    
  51.      _________________________________________________________________
  52.    
  53.    
  54.    
  55. What a sniffer is and how it works
  56.  
  57.    Unlike telephone circuits, computer networks are shared communication
  58.    channels. It is simply too expensive to dedicate local loops to the
  59.    switch (hub) for each pair of communicating computers. Sharing means
  60.    that computers can receive information that was intended for other
  61.    machines. To capture the information going over the network is called
  62.    sniffing.
  63.    
  64.    Most popular way of connecting computers is through ethernet.
  65.    Ethernet protocol works by sending packet information to all the
  66.    hosts on the same circuit. The packet header contains the proper
  67.    address of the destination machine. Only the machine with the
  68.    matching address is suppose to accept the packet. A machine that is
  69.    accepting all packets, no matter what the packet header says, is said
  70.    to be in promiscuous mode.
  71.    
  72.    Because, in a normal networking environment, account and password
  73.    information is passed along ethernet in clear-text, it is not hard
  74.    for an intruder once they obtain root to put a machine into
  75.    promiscuous mode and by sniffing, compromise all the machines on the
  76.    net.
  77.    
  78.    
  79.      _________________________________________________________________
  80.    
  81.    
  82.    
  83. Where are sniffers available
  84.  
  85.    Sniffing is one of the most popular forms of attacks used by hackers.
  86.    One special sniffer, called Esniff.c, is very small, designed to work
  87.    on Sunos, and only captures the first 300 bytes of all telnet, ftp,
  88.    and rlogin sessions. It was published in Phrack, one of the most
  89.    widely read freely available underground hacking magazines. You can
  90.    find Phrack on many FTP sites. Esniff.c is also available on many FTP
  91.    sites such as coombs.anu.edu.au:/pub/net/log.
  92.    
  93.    You may want to run Esniff.c on an authorized network to quickly see
  94.    how effective it is in compromising local machines.
  95.    
  96.    Other sniffers that are widely available which are intended to debug
  97.    network problems are:
  98.    
  99.      * Etherfind on SunOs4.1.x
  100.      * Snoop on Solaris 2.x and SunOs 4.1 (on ftp playground.sun.com)
  101.      * Tcpdump 3.0 uses bpf for a multitude of platforms.
  102.      * Packetman, Interman, Etherman, Loadman works on the following
  103.        platforms:
  104.        SunOS, Dec-Mips, SGI, Alpha, and Solaris. It is available on
  105.        ftp.cs.curtin.edu.au:/pub/netman/[sun4c|dec-mips|sgi|alpha|solar
  106.        is2]/
  107.        [etherman-1.1a|interman-1.1|loadman-1.0|packetman-1.1].tar.Z 
  108.        Packetman was designed to capture packets, while Interman,
  109.        Etherman, and Loadman monitor traffic of various kinds. 
  110.        
  111.     DOS based sniffers
  112.    
  113.        
  114.      * Gobbler for IBM DOS Machines
  115.      * ethdump v1.03
  116.        Available on ftp
  117.        ftp.germany.eu.net:/pub/networking/inet/ethernet/ethdp103.zip 
  118.      * ethload v1.04
  119.        Companion utility to a ethernet monitor. Available on ftp
  120.        ftp.germany.eu.net:/pub/networking/monitoring/ethload/ethld104.z
  121.        ip 
  122.        
  123.    
  124.    
  125.    Commercial Sniffers are available at:
  126.    
  127.      * Klos Technologies, Inc.
  128.        
  129.      PacketView - Low cost network protocol analyzer
  130.      
  131.      Phone: 603-424-8300
  132.      BBS: 603-429-0032
  133.    
  134.      * Network General.
  135.        
  136.      Network General produces a number of products. The most important
  137.      are the Expert Sniffer, which not only sniffs on the wire, but also
  138.      runs the packet through a high-performance expert system, diagnosing
  139.      problems for you. There is an extension onto this called the
  140.      "Distributed Sniffer System" that allows you to put the console to
  141.      the expert sniffer on you Unix workstation and to distribute the
  142.      collection agents at remote sites.
  143.    
  144.      * Microsoft's Net Monitor
  145.        
  146.      " My commercial site runs many protocols on one wire - NetBeui,
  147.      IPX/SPX, TCP/IP, 802.3 protocols of various flavors, most notably
  148.      SNA. This posed a big problem when trying to find a sniffer to
  149.      examine the network problems we were having, since I found that some
  150.      sniffers that understood Ethernet II parse out some 802.3 traffic as
  151.      bad packets, and vice versa. I found that the best protocol parser
  152.      was in Microsoft's Net Monitor product, also known as Bloodhound in
  153.      its earlier incarnations. It is able to correctly identify such
  154.      oddities as NetWare control packets, NT NetBios name service
  155.      broadcasts, etc, which etherfind on a Sun simply registered as type
  156.      0000 packet broadcasts. It requires MS Windows 3.1 and runs quite
  157.      fast on a HP XP60 Pentium box. Top level monitoring provides network
  158.      statistics and information on conversations by mac address (or
  159.      hostname, if you bother with an ethers file). Looking at tcpdump
  160.      style details is as simple as clicking on a conversation. The filter
  161.      setup is also one of the easiest to implement that I've seen, just
  162.      click in a dialog box on the hosts you want to monitor. The number
  163.      of bad packets it reports on my network is a tiny fraction of that
  164.      reported by other sniffers I've used. One of these other sniffers in
  165.      particular was reporting a large number of bad packets with src mac
  166.      addresses of aa:aa:aa:aa:aa:aa but I don't see them at all using the
  167.      MS product. - Anonymous
  168.      
  169.    
  170.      _________________________________________________________________
  171.    
  172.    
  173.    
  174. How to detect a sniffer running.
  175.  
  176.    To detect a sniffing device that only collects data and does not
  177.    respond to any of the information, requires physically checking all
  178.    your ethernet connections by walking around and checking the ethernet
  179.    connections individually.
  180.    
  181.    It is also impossible to remotely check by sending a packet or ping
  182.    if a machine is sniffing.
  183.    
  184.    A sniffer running on a machine puts the interface into promiscuous
  185.    mode, which accepts all the packets. On some Unix boxes, it is
  186.    possible to detect a promiscuous interface. It is possible to run a
  187.    sniffer in non-promiscuous mode, but it will only capture sessions
  188.    from the machine it is running on. It is also possible for the
  189.    intruder to do similiar capture of sessions by trojaning many
  190.    programs such as sh, telnet, rlogin, in.telnetd, and so on to write
  191.    a log file of what the user did. They can easily watch the tty and
  192.    kmem devices as well. These attacks will only compromise sessions
  193.    coming from that one machine, while promiscuous sniffing compromises
  194.    all sessions on the ethernet. 
  195.    
  196.    For SunOs, NetBSD, and other possible BSD derived Unix systems, there
  197.    is a command
  198.    
  199.      "ifconfig -a"
  200.      
  201.    that will tell you information about all the interfaces and if they
  202.    are in promiscuous mode. DEC OSF/1 and IRIX and possible other OSes
  203.    require the device to be specified. One way to find out what
  204.    interface is on the system, you can execute:
  205.  
  206. # netstat -r
  207. Routing tables
  208.  
  209. Internet:
  210. Destination      Gateway            Flags     Refs     Use  Interface
  211. default          iss.net            UG          1    24949  le0
  212. localhost        localhost          UH          2       83  lo0
  213.  
  214.  
  215.    Then you can test for each interface by doing the following command:
  216.  
  217. #ifconfig le0
  218. le0: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,PROMISC,MULTICAST>
  219.         inet 127.0.0.1 netmask 0xffffff00 broadcast 255.0.0.1
  220.  
  221.  
  222.    Intruders often replace commands such as ifconfig to avoid detection.
  223.    Make sure you verify its checksum.
  224.    
  225.    There is a program called cpm available on
  226.    ftp.cert.org:/pub/tools/cpm that only works on Sunos and is suppose
  227.    to check the interface for promiscuous flag.
  228.    
  229.    Ultrix can possibly detect someone running a sniffer by using the
  230.    commands pfstat and pfconfig.
  231.    
  232.    pfconfig allows you to set who can run a sniffer
  233.    pfstat shows you if the interface is in promiscuous mode.
  234.    
  235.    These commands only work if sniffing is enabled by linking it into the
  236.    kernel. by default, the sniffer is not linked into the kernel. Most
  237.    other Unix systems, such as Irix, Solaris, SCO, etc, do not have any
  238.    flags indication whether they are in promiscuous mode or not,
  239.    therefore an intruder could be sniffing your whole network and there
  240.    is no way to detect it.
  241.    
  242.    Often a sniffer log becomes so large that the file space is all used
  243.    up. On a high volume network, a sniffer will create a large load on
  244.    the machine. These sometimes trigger enough alarms that the
  245.    administrator will discover a sniffer. I highly suggest using lsof
  246.    (LiSt Open Files) available from coast.cs.purdue.edu:/pub/Purdue/lsof
  247.    for finding log files and finding programs that are accessing the
  248.    packet device such as /dev/nit on SunOs.
  249.    
  250.    There is no commands I know of to detect a promiscuous IBM PC
  251.    compatible machine, but they atleast usually do not allow command
  252.    execution unless from the console, therefore remote intruders can not
  253.    turn a PC machine into a sniffer without inside assistance.
  254.    
  255.    
  256.      _________________________________________________________________
  257.    
  258.    
  259.    
  260. Stopping sniffing attacks
  261.  
  262.    Active hubs send to each system only packets intended for it
  263.    rendering promiscuous sniffing useless. This is only effective for
  264.    10-Base T.
  265.    
  266.    The following vendors have available active hubs:
  267.    
  268.      * 3Com
  269.        
  270.      * HP
  271.        
  272.        
  273.    
  274.    
  275.    
  276.      _________________________________________________________________
  277.    
  278.    
  279.    
  280.   ENCRYPTION
  281.   
  282.    There are several packages out there that allow encryption between
  283.    connections therefore an intruder could capture the data, but could
  284.    not decypher it to make any use of it.
  285.    
  286.    Some packages available are:
  287.    
  288.      * deslogin is one package available at ftp
  289.        coast.cs.purdue.edu:/pub/tools/unix/deslogin .
  290.        
  291.      * swIPe is another package available at
  292.        ftp.csua.berkeley.edu:/pub/cypherpunks/swIPe/ 
  293.        
  294.      * Netlock encrypts all (tcp, udp, and raw ip based) communications
  295.        transparently. It has automatic (authenticated Diffie-Helman)
  296.        distibuted key management mechanism for each host and runs on the
  297.        SUN 4.1 and HP 9.x systems. The product comes with a Certification
  298.        Authority Management application which generates host certificates
  299.        (X.509) used for authentication between the hosts. and provides
  300.        centralized control of each Hosts communications rules.
  301.        
  302.        The product is built by Hughes Aircraft and they can be reached at
  303.        800-825-LOCK or email at netlock@mls.hac.com.
  304.        
  305.    
  306.    
  307.    
  308.      _________________________________________________________________
  309.    
  310.    
  311.    
  312.   KERBEROS
  313.   
  314.    
  315.    
  316.    Kerberos is another package that encrypts account information going
  317.    over the network. Some of its draw backs are that all the account
  318.    information is held on one host and if that machine is compromised,
  319.    the whole network is vulnerable. It is has been reported a major
  320.    difficulty to set up. Kerberos comes with a stream-encrypting
  321.    rlogind, and stream-encrypting telnetd is available. This prevents
  322.    intruders from capturing what you did after you logged in.
  323.    
  324.    There is a Kerberos FAQ at ftp at rtfm.mit.edu in
  325.    /pub/usenet/comp.protocols/kerberos/Kerberos_Users__Frequently_Asked_
  326.    Questions_1.11 
  327.    
  328.    
  329.      _________________________________________________________________
  330.    
  331.    
  332.    
  333.   ONE TIME PASSWORD TECHNOLOGY
  334.   
  335.    
  336.    
  337.    S/key and other one time password technology makes sniffing account
  338.    information almost useless. S/key concept is having your remote host
  339.    already know a password that is not going to go over insecure
  340.    channels and when you connect, you get a challenge. You take the
  341.    challenge information and password and plug it into an algorithm
  342.    which generates the response that should get the same answer if the
  343.    password is the same on the both sides. Therefore the password never
  344.    goes over the network, nor is the same challenge used twice. Unlike
  345.    SecureID or SNK, with S/key you do not share a secret with the host.
  346.    S/key is available on ftp:thumper.bellcore.com:/pub/nmh/skey
  347.    
  348.    Other one time password technology is card systems where each user
  349.    gets a card that generates numbers that allow access to their account.
  350.    Without the card, it is improbable to guess the numbers.
  351.    
  352.    The following are companies that offer solutions that are provide
  353.    better password authenication (ie, handheld password devices):
  354.    
  355.    
  356.     Secure Net Key (SNK)
  357.     
  358.    Digital Pathways, Inc.
  359.    201 Ravendale Dr. Mountainview, Ca.
  360.    97703-5216 USA
  361.    
  362.    Phone: 415-964-0707 Fax: (415) 961-7487
  363.    
  364.    
  365.     Secure ID
  366.     
  367.    Security Dynamics,
  368.    One Alewife Center
  369.    Cambridge, MA 02140-2312
  370.    USA Phone: 617-547-7820
  371.    Fax: (617) 354-8836
  372.    Secure ID uses time slots as authenication rather than
  373.    challenge/response.
  374.    
  375.    
  376.     ArKey and OneTime Pass
  377.     
  378.    Management Analytics
  379.    PO Box 1480
  380.    Hudson, OH 44236
  381.    Email: fc@all.net
  382.    Tel:US+216-686-0090 Fax: US+216-686-0092
  383.    
  384.    OneTime Pass (OTP):
  385.    This program provides unrestricted one-time pass codes on a user by
  386.    user basis without any need for cryptographic protocols or hardware
  387.    devices. The user takes a list of usable pass codes and scratches out
  388.    each one as it is used. The system tracks usage, removing each
  389.    passcode from the available list when it is used. Comes with a very
  390.    small and fast password tester and password and pass phrase generation
  391.    systems.
  392.    
  393.    ArKey:
  394.    This is the original Argued Key system that mutually authenticates
  395.    users and systems to each other based on their common knowledge. No
  396.    hardware necessary. Comes with a very small and fast password tester
  397.    and password and pass phrase generation systems.
  398.    
  399.     WatchWord and WatchWord II
  400.     
  401.    Racal-Guardata
  402.    480 Spring Park Place
  403.    Herndon, VA 22070
  404.    703-471-0892
  405.    1-800-521-6261 ext 217
  406.    
  407.    
  408.     CRYPTOCard
  409.     
  410.    Arnold Consulting, Inc.
  411.    2530 Targhee Street, Madison, Wisconsin
  412.    53711-5491 U.S.A.
  413.    Phone : 608-278-7700 Fax: 608-278-7701
  414.    Email: Stephen.L.Arnold@Arnold.Com
  415.    CRYPTOCard is a modern, SecureID-sized, SNK-compatible device.
  416.    
  417.    
  418.     SafeWord
  419.     
  420.    Enigma Logic, Inc.
  421.    2151 Salvio #301
  422.    Concord, CA 94520
  423.    510-827-5707 Fax: (510)827-2593
  424.    For information about Enigma ftp to: ftp.netcom.com in directory
  425.    /pub/sa/safeword
  426.    
  427.    
  428.     Secure Computing Corporation:
  429.     
  430.    2675 Long Lake Road
  431.    Roseville, MN 55113
  432.    Tel: (612) 628-2700
  433.    Fax: (612) 628-2701
  434.    debernar@sctc.com 
  435.    
  436.    
  437.      _________________________________________________________________
  438.    
  439.    
  440.    
  441.   NON-PROMISCUOUS INTERFACES
  442.   
  443.    
  444.    
  445.    You can try to make sure that most IBM DOS compatible machines have
  446.    interfaces that will not allow sniffing. Here is a list of cards that
  447.    do not support promiscuous mode:
  448.    
  449.    Test the interface for promiscuous mode by using the Gobbler. If you
  450.    find a interface that does do promiscuous mode and it is listed
  451.    here, please e-mail cklaus@iss.net so I can remove it ASAP. 
  452.    
  453.      IBM Token-Ring Network PC Adapter
  454.      IBM Token-Ring Network PC Adapter II (short card)
  455.      IBM Token-Ring Network PC Adapter II (long card)
  456.      IBM Token-Ring Network 16/4 Adapter
  457.      IBM Token-Ring Network PC Adapter/A
  458.      IBM Token-Ring Network 16/4 Adapter/A
  459.      IBM Token-Ring Network 16/4 Busmaster Server Adapter/A
  460.      
  461.    The following cards are rumoured to be unable to go into promiscuous
  462.    mode, but that the veracity of those rumours is doubtful.
  463.    
  464.      Microdyne (Excelan) EXOS 205
  465.      Microdyne (Excelan) EXOS 205T
  466.      Microdyne (Excelan) EXOS 205T/16
  467.      Hewlett-Packard 27250A EtherTwist PC LAN Adapter Card/8
  468.      Hewlett-Packard 27245A EtherTwist PC LAN Adapter Card/8
  469.      Hewlett-Packard 27247A EtherTwist PC LAN Adapter Card/16
  470.      Hewlett-Packard 27248A EtherTwist EISA PC LAN Adapter Card/32
  471.      HP 27247B EtherTwist Adapter Card/16 TP Plus
  472.      HP 27252A EtherTwist Adapter Card/16 TP Plus
  473.      HP J2405A EtherTwist PC LAN Adapter NC/16 TP
  474.      
  475.    Adapters based upon the TROPIC chipset generally do not support
  476.    promiscuous mode. The TROPIC chipset is used in IBM's Token Ring
  477.    adapters such as the 16/4 adapter. Other vendors (notably 3Com) also
  478.    supply TROPIC based adapters. TROPIC-based adapters do accept special
  479.    EPROMs, however, that will allow them to go into promiscuous mode.
  480.    However, when in promiscuous mode, these adapters will spit out a
  481.    "Trace Tool Present" frame.
  482.    
  483.    
  484.      _________________________________________________________________
  485.    
  486.   ACKNOWLEDGEMENTS
  487.   
  488.    I would like to thank the following people for the contribution to
  489.    this FAQ that has helped to update and shape it:
  490.      * Padgett Peterson (padgett@tccslr.dnet.mmc.com)
  491.      * Steven Bellovin (smb@research.att.com)
  492.      * Wietse Venema (wietse@wzv.win.tue.nl)
  493.      * Robert D. Graham (robg@NGC.COM)
  494.      * Kevin Martinez (kevinm@beavis.qntm.com)
  495.      * Frederick B. Cohen (fc@all.net)
  496.      * James Bonfield (jkb@mrc-lmb.cam.ac.uk)
  497.      * Marc Horowitz (marc@MIT.EDU)
  498.      * Steve Edwards (steve@newline.com)
  499.      * Andy Poling (Andy.Poling@jhu.edu)
  500.      * Jeff Collyer (jeff@cnet-pnw.com)
  501.      * Sara Gordon (sgordon@sun1.iusb.indiana.edu)
  502.        
  503.    
  504.      _________________________________________________________________
  505.    
  506.   COPYRIGHT
  507.  
  508. This paper is Copyright (c) 1994, 1995
  509.    by Christopher Klaus of Internet Security Systems, Inc.
  510.  
  511.    
  512.    
  513.    Permission is hereby granted to give away free copies electronically.
  514.    You may distribute, transfer, or spread this paper electronically. You
  515.    may not pretend that you wrote it. This copyright notice must be
  516.    maintained in any copy made. If you wish to reprint the whole or any
  517.    part of this paper in any other medium (ie magazines, books, etc)
  518.    excluding electronic medium, please ask the author for permission.
  519.    
  520.   DISCLAIMER
  521.   
  522.    
  523.    
  524.    The information within this paper may change without notice. Use of
  525.    this information constitutes acceptance for use in an AS IS condition.
  526.    There are NO warranties with regard to this information. In no event
  527.    shall the author be liable for any damages whatsoever arising out of
  528.    or in connection with the use or spread of this information. Any use
  529.    of this information is at the user's own risk.
  530.    
  531.   ADDRESS OF AUTHOR
  532.   
  533.    
  534.    
  535.    Please send suggestions, updates, and comments to:
  536.     Christopher Klaus <cklaus@iss.net> of Internet Security Systems, Inc.
  537.     <iss@iss.net>
  538.     
  539.    
  540.    
  541.   INTERNET SECURITY SYSTEMS, INC.
  542.   
  543.    Internet Security Systems, Inc, located in Atlanta, Ga., specializes
  544.    in the developement of security scanning software tools. Its flagship
  545.    product, Internet Scanner, is software that learns an organization's
  546.    network and probes every device on that network for security holes. It
  547.    is the most comprehensive "attack simulator" available, checking for
  548.    over 100 security vulnerabilities. 
  549.